package com.bobby.dao;

import com.bobby.pojo.Book;

import java.sql.SQLException;
import java.util.List;

/**
 * @Description TODO
 * @Date 2020/8/14 15:34
 * @Created wenjunpei
 */
public interface BookDao {



    int addBook(Book book) throws SQLException;

    int deleteBookById(Integer id) throws SQLException;

    int updateBook(Book book) throws SQLException;

    Book queryBookById(Integer id) throws SQLException;

    List<Book> queryBooks() throws SQLException;

    Long queryForPageTotalCount() throws SQLException;

    List<Book> queryForItems(Long begin, Long pageSize) throws SQLException;

    Long queryForPageTotalCountByPrice(Double min, Double max) throws SQLException;

    List<Book> queryForItemsByPrice(Long begin, Long pageSize, Double min, Double max) throws SQLException;
}
